import request from '@/utils/request'
const prefix = '/ap/net'
export class BasicConfigApi {
    //获取本机IP
    static getLocalIp() {
        return request({
            url:`${prefix}/lan/lan_get`,
            method:'post',
        })
    }

    //设置本机IP
    static setLocalIp(data:any) {
        return request({
            url:`${prefix}/lan/lan_set`,
            method:'post',
            data
        })
    }

    //获取CAA与GRE
    static getCaaOrGre() {
        return request({
            url:`${prefix}/caa_gre_get`,
            method:'post',
        })
    }

    //设置CAA与GRE
    static setCaaOrGre(data:any) {
        return request({
            url:`${prefix}/caa_gre_set`,
            method:'post',
            data
        })
    }

    //获取反向NAT
    static reqPostReverseNat() {
        return request({
            url:`${prefix}/lan/reverse_nat_get`,
            method:'post',
        })
    }

    //设置反向NAT
    static reqSetReverseNat(data:any) {
        return request({
            url:`${prefix}/lan/reverse_nat_set`,
            method:'post',
            data
        })
    }

    //获取WIFI设置
    static reqGetWifiSetting() {
        return request({
            url:`${prefix}/lan/wifi_get`,
            method:'post',
        })
    }

    //设置WIFI设置
    static reqSetWifiSetting(data:any) {
        return request({
            url:`${prefix}/lan/wifi_set`,
            method:'post',
            data
        })
    }

    //获取DHCP设置
    static reqGetDhcpSetting() {
        return request({
            url:`${prefix}/lan/dhcp_get`,
            method:'post',
        })
    }

    //设置DHCP设置
    static reqSetDhcpSetting(data:any) {
        return request({
            url:`${prefix}/lan/dhcp_set`,
            method:'post',
            data
        })
    }


    //IP加速信息获取
    static reqGetIpAccelerationInfo() {
        return request({
            url:`${prefix}/ip_accelerate_get`,
            method:'post',
        })
    }

    //IP加速信息设置
    static reqSetIpAccelerationInfo(data:any) {
        return request({
            url:`${prefix}/ip_accelerate_set`,
            method:'post',
            data
        })
    }

    //ALOHA获取
    static reqGetAloha() {
        return request({
            url:`${prefix}/aloha_get`,
            method:'post',
        })
    }

    //ALOHA设置
    static reqSetAloha(data:any) {
        return request({
            url:`${prefix}/aloha_set`,
            method:'post',
            data
        })
    }

    //飞行模式获取
    static reqGetFlightMode() {
        return request({
            url:`${prefix}/airplane_mode_get`,
            method:'post',
        })
    }

    //飞行模式设置
    static reqSetFlightMode(data:any) {
        return request({
            url:`${prefix}/airplane_mode_set`,
            method:'post',
            data
        })
    }

    //DNN配置获取
    static reqGetDnnConfig() {
        return request({
            url:`${prefix}/apn_get`,
            method:'post',
        })
    }

    //DNN配置
    static reqSetDnnConfig(data:any) {
        return request({
            url:`${prefix}/apn_set`,
            method:'post',
            data
        })
    }

    //DNN列表获取
    static reqGetDnnList() {
        return request({
            url:`${prefix}/apn_list_get`,
            method:'post',
        })
    }

    //删除APN配置
    static reqDeleteApnConfig(data:any) {
        return request({
            url:`${prefix}/apn_list_del`,
            method:'post',
            data
        })
    }

    //添加APN配置
    static reqAddApnConfig(data:any) {
        return request({
            url:`${prefix}/apn_list_add`,
            method:'post',
            data
        })
    }
}